Work around the fact that the physinfo dom0 call is not implemented for IA64.
authoremellor@leeni.uk.xensource.com <emellor@leeni.uk.xensource.com>
Thu, 1 Dec 2005 03:26:47 +0000 (03:26 +0000)
committeremellor@leeni.uk.xensource.com <emellor@leeni.uk.xensource.com>
Thu, 1 Dec 2005 03:26:47 +0000 (03:26 +0000)
Signed-off-by: Ewan Mellor <ewan@xensource.com>
tools/python/xen/util/bugtool.py

index 06c924beefd000dcb9378fca2fcdadd3c1e6668d..646149cfc1522299f695ff377f16a58c8d17d30b 100644 (file)
@@ -69,10 +69,17 @@ those logs from the archive.
     bugball = []
 
     xc = xen.lowlevel.xc.xc()
-    bugball.append(string_iterator('xen-dmesg', xc.readconsolering()))
-    bugball.append(string_iterator('physinfo',  prettyDict(xc.physinfo())))
-    bugball.append(string_iterator('xeninfo',   prettyDict(xc.xeninfo())))
-    del xc
+
+    def do(n, f):
+        try:
+            s = f()
+        except Exception, exn:
+            s = str(exn)
+        bugball.append(string_iterator(n, s))
+
+    do('xen-dmesg', lambda: xc.readconsolering())
+    do('physinfo',  lambda: prettyDict(xc.physinfo()))
+    do('xeninfo',   lambda: prettyDict(xc.xeninfo()))
 
     for filename in FILES_TO_SEND:
         if not os.path.exists(filename):